package cc.wangzijie.ddns.aliyun.client.utils;

import com.aliyuncs.alidns.model.v20150109.DescribeDomainRecordsResponse;
import lombok.Data;

/**
 * @author wangzijie
 */
@Data
public class DdnsRecord {

    private String recordId;
    private String domainName;
    private String rr;
    private String type;
    private String value;

    public static DdnsRecord newInstance(DescribeDomainRecordsResponse.Record record) {
        DdnsRecord ddnsRecord = new DdnsRecord();
        ddnsRecord.setRecordId(record.getRecordId());
        ddnsRecord.setDomainName(record.getDomainName());
        ddnsRecord.setRr(record.getRR());
        ddnsRecord.setType(record.getType());
        ddnsRecord.setValue(record.getValue());
        return ddnsRecord;
    }

}
